<!doctype html>
<html>

<head>
	<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
	<meta name="viewport"
		content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-touch-fullscreen" content="yes" />
	<meta name="format-detection" content="telephone=no,address=no" />
	<meta name="apple-mobile-web-app-status-bar-style" content="white" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
	<!-- <script src="https://wwcdn.weixin.qq.com/node/open/js/wecom-jssdk-2.0.2.js"></script> -->
	<!-- 引入微信JS-SDK -->
	<script src="https://res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>

	<!-- <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet"> -->


	<!-- 引入腾讯地图SDK -->
	<script charset="utf-8" src="https://map.qq.com/api/gljs?v=1.exp&key=N4DBZ-Q2W37-JNHXL-PI6NN-55FH5-2BF74"></script>
	<title>能力都市</title>
	<script>
			<%= htmlWebpackPlugin.options.script %>
	</script>
</head>

<body class="text-base">
	<div id="app"></div>
	<script>
		(function() {
			// 检查URL参数是否包含debug=1
			function getUrlParam(name) {
				var urlParams = new URLSearchParams(window.location.search);
				return urlParams.get(name);
			}

			
			// 只有当debug=1时才加载eruda
			if (getUrlParam('debug') == '1') {
				localStorage.setItem('debug', '1');
			}
			if (getUrlParam('debug') == '0') {
				localStorage.removeItem('debug');
			}
			if (localStorage.getItem('debug') == '1') {
				// 动态加载eruda
				var script = document.createElement('script');
				// script.src = 'https://cdn.bootcss.com/eruda/1.3.0/eruda.min.js';
				script.src = 'https://cdn.jsdelivr.net/npm/eruda';
				script.onload = function() {
					if (typeof eruda !== 'undefined') {
						eruda.init();
						console.log('Eruda调试工具已加载');
					}
				};
				script.onerror = function() {
					console.error('Eruda加载失败');
				};
				document.head.appendChild(script);
			}
		})();
	</script>
</body>

</html>